/**
 * 日程有一个设置时间段功能，要求用户可以在任何时间请假，但是要求这些时间段不能重复。
 * 例如用户设置了10:00~11:00, 13:00~14:00,15:00~15:30,15:30~16:30
 * 判断下面的时间段是否合法
 * 
 * node content/5_programing/1_timejudge.js
 */

var times = [
  '2018-11-19 03:10,2018-11-19 04:10',
  '2018-11-20 03:10,2018-11-20 04:10',
  '2018-11-19 14:20,2018-11-19 15:20',
  '2018-11-19 17:20,2018-11-19 18:10',
  '2018-11-19 08:11,2018-11-19 09:10',
  '2018-11-19 01:10,2018-11-19 02:30',
  '2018-11-19 13:10,2018-11-19 14:10',
  '2018-11-19 21:10,2018-11-19 23:00',
  '2018-11-19 17:10,2018-11-19 17:20',
  '2018-11-19 19:10,2018-11-19 20:10',
  '2018-11-19 15:10,2018-11-19 15:11'
]




// var times = [
//   '2018-11-19 03:10,2018-11-19 04:10',
//   '2018-11-19 04:20,2018-11-19 07:10'
// ]

// var times = [
//   '2018-11-19 03:10,2018-11-19 04:10',
//   '2018-11-19 02:20,2018-11-19 06:10'
// ]

// var times = [
//   '2018-11-19 03:10,2018-11-19 04:10',
//   '2018-11-19 03:20,2018-11-19 03:00'
// ]

// var times = [
//   '2018-11-19 03:10,2018-11-19 04:10',
//   '2018-11-20 03:10,2018-11-20 04:10',
//   '2018-11-19 14:20,2018-11-19 15:20',
//   '2018-11-19 17:19,2018-11-19 18:10',
//   '2018-11-19 08:11,2018-11-19 09:10',
//   '2018-11-19 01:10,2018-11-19 02:30',
//   '2018-11-19 13:10,2018-11-19 14:10',
//   '2018-11-19 21:10,2018-11-19 23:00',
//   '2018-11-19 17:10,2018-11-19 17:20',
//   '2018-11-19 19:10,2018-11-19 20:10',
//   '2018-11-19 15:10,2018-11-19 15:11'
// ]

function hasCross() {
  // todo:
}

var result = hasCross(times)
console.log(result) // true of false
